unit Insert_Code;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Mask, JvExMask, JvToolEdit, JvMaskEdit, ExtCtrls,
  JvExStdCtrls, JvEdit;

type
  TF_InsertarCodigo = class(TForm)
    Panel2: TPanel;
    Image: TImage;
    Label_Titulo: TLabel;
    L_Error: TLabel;
    Edit_Codigo: TJvEdit;
    procedure Edit_CodigoKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
    procedure Aceptar;
  public
    { Public declarations }
  end;

implementation

{$R *.dfm}

procedure TF_InsertarCodigo.Edit_CodigoKeyPress(Sender: TObject; var Key: Char);
begin
  if (Key = #13) then
    Aceptar;

end;

procedure TF_InsertarCodigo.Aceptar;
begin
  ModalResult:= mrOk;
end;

end.
